/*
 * @Description: Routes/getUser
 * @Author: zoeblow
 * @Email: wangfuyuan@nnuo.com
 * @Date: 2019-12-12 14:52:25
 * @LastEditors  : zoeblow
 * @LastEditTime : 2020-01-06 09:50:19
 * @FilePath: \monitor-manage\routes\getUser.js
 */
const express = require("express");
const router = express.Router();

// const { User } = require("../schema/user.js");

router.use((req, res, next) => {
  console.log(`路由执行成功啦~~~`, Date.now());
  next();
});

router.get("/", (req, res) => {
  res.json({
    message: "请求成功",
    code: 200
  });
  // User.find({}, function(err, resx) {
  //   if (err) return;
  //   let all = resx.length;

  //   //   return res.json({
  //   //     status: 0,
  //   //     message: "请求成功",
  //   //     total: all,
  //   //     hlist: resx
  //   //   });
  //   res.type("html");
  //   res.render("user", { title: "User", result: { count: all, data: resx } });
  // });
});

module.exports = router;
